package com.zzjson.result;

import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2019 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.result</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2019年07月15日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class MyResultHandler implements ResultHandler {
	@SuppressWarnings("rawtypes")
	private final Map mappedResults = new HashMap();

	@Override
	public void handleResult(ResultContext resultContext) {
		Map map = (Map) resultContext.getResultObject();
		mappedResults.put(map.get("key"), map.get("value"));
	}

	public Map getMappedResults() {
		return mappedResults;
	}
}
